package com.example.review.Fragment;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import androidx.fragment.app.Fragment;

import com.example.review.R;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import butterknife.BindView;

/**
 * A simple {@link Fragment} subclass.
 */
public class TimeFragment extends Fragment {


    @BindView(R.id.timeText)
    TextView timeText;

    public TimeFragment() {
        // Required empty public constructor
    }

    @Override
    public void onStop() {
        super.onStop();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_time, container, false);
        SimpleDateFormat format = new SimpleDateFormat();
        Date date = new Date();
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DATE, 1);
        Date date1 = calendar.getTime();
        String format1 = format.format(date);
        String format2 = format.format(date1);
        Toast.makeText(getContext(),format1+format2,Toast.LENGTH_SHORT).show();
        return view;
    }

}
